package com.said.today.utils;

public interface ILock {
    /**
     * 获取锁
     * @param timeoutSec 锁持有时间，过期自动释放锁
     * @return true获取锁成功，否则失败
     */
    boolean tryLock(long timeoutSec);

    /**
     * 释放锁
     */
    void unlock();
}
